package cn.cc.order.controller;

import cn.cc.common.result.utils.RestResult;
import cn.cc.order.service.bo.Order;
import cn.cc.order.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @program: smail-mi-cloud
 * @description: 订单接口
 * @author: Mr.WuChao
 * @create: 2021-07-26 10:52
 **/
@RestController
@RequestMapping("/order")
public class OrderController {
    @Autowired
    private OrderService orderService;

    @PostMapping("/order")
    public RestResult<Void> getOrder(Order order) {
        return orderService.addOrder(order);
    }
}
